import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/common/form_value_entity.dart';

FormValueEntity $FormValueEntityFromJson(Map<String, dynamic> json) {
  final FormValueEntity formValueEntity = FormValueEntity();
  final String? businessDataId = jsonConvert.convert<String>(json['businessDataId']);
  if (businessDataId != null) {
    formValueEntity.businessDataId = businessDataId;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    formValueEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    formValueEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    formValueEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    formValueEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    formValueEntity.deleted = deleted;
  }
  final String? dictionaryTableId = jsonConvert.convert<String>(json['dictionaryTableId']);
  if (dictionaryTableId != null) {
    formValueEntity.dictionaryTableId = dictionaryTableId;
  }
  final String? formConfigurationId = jsonConvert.convert<String>(json['formConfigurationId']);
  if (formConfigurationId != null) {
    formValueEntity.formConfigurationId = formConfigurationId;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    formValueEntity.id = id;
  }
  final String? label = jsonConvert.convert<String>(json['label']);
  if (label != null) {
    formValueEntity.label = label;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    formValueEntity.name = name;
  }
  final String? nodeId = jsonConvert.convert<String>(json['nodeId']);
  if (nodeId != null) {
    formValueEntity.nodeId = nodeId;
  }
  final String? processEncoding = jsonConvert.convert<String>(json['processEncoding']);
  if (processEncoding != null) {
    formValueEntity.processEncoding = processEncoding;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    formValueEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    formValueEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    formValueEntity.updateDate = updateDate;
  }
  final String? value = jsonConvert.convert<String>(json['value']);
  if (value != null) {
    formValueEntity.value = value;
  }
  return formValueEntity;
}

Map<String, dynamic> $FormValueEntityToJson(FormValueEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['businessDataId'] = entity.businessDataId;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['dictionaryTableId'] = entity.dictionaryTableId;
  data['formConfigurationId'] = entity.formConfigurationId;
  data['id'] = entity.id;
  data['label'] = entity.label;
  data['name'] = entity.name;
  data['nodeId'] = entity.nodeId;
  data['processEncoding'] = entity.processEncoding;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['value'] = entity.value;
  return data;
}

extension FormValueEntityExtension on FormValueEntity {
  FormValueEntity copyWith({
    String? businessDataId,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? dictionaryTableId,
    String? formConfigurationId,
    String? id,
    String? label,
    String? name,
    String? nodeId,
    String? processEncoding,
    String? updateBy,
    String? updateById,
    String? updateDate,
    String? value,
  }) {
    return FormValueEntity()
      ..businessDataId = businessDataId ?? this.businessDataId
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..dictionaryTableId = dictionaryTableId ?? this.dictionaryTableId
      ..formConfigurationId = formConfigurationId ?? this.formConfigurationId
      ..id = id ?? this.id
      ..label = label ?? this.label
      ..name = name ?? this.name
      ..nodeId = nodeId ?? this.nodeId
      ..processEncoding = processEncoding ?? this.processEncoding
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..value = value ?? this.value;
  }
}
